package com.frcdi.qms.masterdata.service.impl;

import com.frcdi.qms.masterdata.domain.ChangeExecution;
import com.frcdi.qms.masterdata.mapper.ChangeExecutionMapper;
import com.frcdi.qms.masterdata.service.IChangeExecutionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 变更执行Service业务层处理
 *
 * @author cell
 * @date 2023-09-25
 */
@Service
public class ChangeExecutionServiceImpl implements IChangeExecutionService
{
    @Autowired
    private ChangeExecutionMapper changeExecutionMapper;

    /**
     * 查询变更执行
     *
     * @param executionId 变更执行主键
     * @return 变更执行
     */
    @Override
    public ChangeExecution selectChangeExecutionByExecutionId(Long executionId)
    {
        return changeExecutionMapper.selectChangeExecutionByExecutionId(executionId);
    }

    /**
     * 查询变更执行列表
     *
     * @param changeExecution 变更执行
     * @return 变更执行
     */
    @Override
    public List<ChangeExecution> selectChangeExecutionList(ChangeExecution changeExecution)
    {
        return changeExecutionMapper.selectChangeExecutionList(changeExecution);
    }

    /**
     * 新增变更执行
     *
     * @param changeExecution 变更执行
     * @return 结果
     */
    @Override
    public int insertChangeExecution(ChangeExecution changeExecution)
    {
        return changeExecutionMapper.insertChangeExecution(changeExecution);
    }

    /**
     * 修改变更执行
     *
     * @param changeExecution 变更执行
     * @return 结果
     */
    @Override
    public int updateChangeExecution(ChangeExecution changeExecution)
    {
        return changeExecutionMapper.updateChangeExecution(changeExecution);
    }

    /**
     * 批量删除变更执行
     *
     * @param executionIds 需要删除的变更执行主键
     * @return 结果
     */
    @Override
    public int deleteChangeExecutionByExecutionIds(Long[] executionIds)
    {
        return changeExecutionMapper.deleteChangeExecutionByExecutionIds(executionIds);
    }

    /**
     * 删除变更执行信息
     *
     * @param executionId 变更执行主键
     * @return 结果
     */
    @Override
    public int deleteChangeExecutionByExecutionId(Long executionId)
    {
        return changeExecutionMapper.deleteChangeExecutionByExecutionId(executionId);
    }
}
